<%@include file="../../context.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Sector List</title>
<%@include file="../common_Admin_imports.jsp"%>

</head>
<body>
	<div class="main_wrapper">
		<div class="header_wrapper">
			<div class="container-fluid">
				<div class="header_inner_wrapper clearfix">
					<div class="row-fluid">
						<div class="header_left span4">List of Sector</div>
						<div class="header_right span8 ">
							<div class="input-append">
								<!-- search section -->
								<form:form method="POST" commandName="criteria"
									action="${pageContext.request.contextPath}/admin/sector/search.html">
									<form:input path="name" />
									<input class="btn" type="submit" value="Search" />
								</form:form>
								<!-- end of search section -->
							</div>
							<jsp:include page="../common_link.jsp" />
						</div>
					</div>
				</div>

				<div class="row-fluid">
					<div class="main_table">
						<table class="table table-bordered table-striped">
							<thead>
								<tr>
									<th id="tableHeader">No</th>
									<th id="tableHeader">Sector Name</th>
									<th id="tableHeader">Ticker</th>
									<th></th>
									<th></th>
								</tr>
							</thead>
							<tbody>

								<c:forEach var="sector" items="${sectorPage.pageData}">
									<tr>
										<td>${sector.id}</td>
										<td>${sector.name}</td>
										<td id="tableHeader">${sector.code}</td>
										<td><div class="btn btn-info">
												<a
													href="${pageContext.request.contextPath}/admin/sector/edit/${sector.id}.html">Edit</a>
											</div></td>
										<td><div class="btn btn-danger">
												<a
													lang="${pageContext.request.contextPath}/admin/sector/delete/${sector.id}.html"
													href="javascript:void(0);"
													onclick="return confirmAndDelete(this);">Delete</a>
											</div></td>
									</tr>
								</c:forEach>
							</tbody>
						</table>

						<!-- paging section -->
						<div class="pagination pagination-right">
							<ul>
								<li><c:if test="${sectorPage.showPrev}">
										<a
											href="${pageContext.request.contextPath}/admin/sector/list.html?page=${sectorPage.currentPageNo-1}&totalRecords=${sectorPage.totalNoOfRecords}">Prev</a>
									</c:if></li>
								<c:forEach begin="${sectorPage.startPageNo}" var="page"
									end="${sectorPage.endPageNo}">
									<li><a
										<c:if test="${sectorPage.currentPageNo==page}">style="background-color:#79BAEC"</c:if>
										href="${pageContext.request.contextPath}/admin/sector/list.html?page=${page}&totalRecords=${sectorPage.totalNoOfRecords}">${page}</a></li>&nbsp;
							</c:forEach>
								<li><c:if test="${sectorPage.showNext}">
										<a
											href="${pageContext.request.contextPath}/admin/sector/list.html?page=${sectorPage.currentPageNo+1}&totalRecords=${sectorPage.totalNoOfRecords}">Next</a>
									</c:if></li>
								<li><a class="pageCountLink">${sectorPage.totalNoOfPages }
										Pages</a></li>
							</ul>
						</div>
						<div>
							<br></br>
						</div>
						<!-- paging section -->
						<div class="btn btn-success">
							<a
								href="${pageContext.request.contextPath}/admin/sector/add.html">Add</a>
						</div>
						<div class="btn btn-info">
							<a href="/StockScreener/admin/admin_home">Admin Home</a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>